home *** CD-ROM | disk | FTP | other *** search
/ Aminet 37 / Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso / Aminet / dev / c / CLib37x.readme < prev    next >
Encoding:
Text File  |  2000-05-03  |  17.6 KB  |  372 lines

  1. Short:    Example.library in 100% C (SAS/Storm/Maxon/GCC/VBCC/DICE/...)
  2. Author:   Andreas R. Kleinert (and a lot of other people - see below)
  3. Uploader: info@ar-kleinert.de
  4. Type:     dev/c
  5.  
  6.   example.library V37.34 (22.4.2000)
  7.  
  8.   An Amiga shared library in 100 % C language - coming with sources.
  9.  
  10.   Compiler Checklist:        Compiler             Support
  11.                              -------------------------------
  12.    (see README.<compiler>    SAS/C 6.5x           yes
  13.     for more information)    MaxonC 3.x           yes
  14.                              StormC 2.x           yes
  15.                              DICE 3.x             yes
  16.                              GCC 2.7.2.1          yes
  17.                              vbcc 0.5+            yes
  18.                              AztecC               (not tested)
  19.  
  20.   OS Checklist:              Operating System     Support
  21.                              -------------------------------
  22.                              Amiga OS 37-40       yes
  23.                              AROS 1.x             yes (AROS source tree)
  24.                              MorphOS 0.x 68k emu  yes (68k emulation)
  25.                              MorphOS 0.x PPC nat  (not yet adjusted)
  26.  
  27.   Original SAS/C and StormC version (C) 1996-2000 by Andreas R. Kleinert.
  28.   StormC rework/additions done 1999 by Fredrik Rambris.
  29.   MaxonC version changes done 1996 by Helmut Hummel and Stephan Rupprecht.
  30.   GCC version changes done 1997 by Stefan Fuchs and Gunter Nikl.
  31.   AROS source tree done 1997 by Aaron Digulla.
  32.   VBCC version changes done 1997 by Patrizio Biancalani and Patrick Burnand.
  33.   DICE adaptation done 1998 by Patrick Burnand.
  34.   All rights reserved.
  35.   ----------------------------------------------------------------------
  36.   This sample library intends to make Amiga shared library sources
  37.   compileable with any available Amiga C compiler - without any
  38.   changes to the source code.
  39.  
  40.   And maybe in the future also running under any Amiga compatible
  41.   operating system with any CPU (e.g. AROS <http://www.aros.org>
  42.   or MorphOS <http://www.morphos.de).
  43.  
  44.   The first goal seams to be easily done: nearly any noticeable compiler
  45.   for the Amiga does support generation of libraries by special
  46.   linker commands and pre-generated object files.
  47.  
  48.   But when looking into the details, one will find out, that these
  49.   linker functionality just reduces the influence of the programmer
  50.   on how his sources are handled, that the pre-generated object
  51.   files just originally were done in Assembler, and that each compiler
  52.   does define its own interface definitions and usage rules.
  53.  
  54.   But as a programmer, it is important to have control over the _complete_
  55.   source code and to be able to compile it _anywhere_ with only
  56.   minor changes, even better without any changes.
  57.  
  58.   Since most Amiga system modules - noticeable Libraries, Devices and
  59.   Resources - do have startup-modules and other larger parts completely
  60.   written in Assembler language, the most important task for getting
  61.   inter-compiler and operating system independant sources in my opinion
  62.   is, to completely migrate the interfaces to C language (but different
  63.   to AROS, for example, it is most important, to keep the sources running
  64.   under the current 68k AmigaOS in the _first_ place - with MorphOS
  65.   two aspects are to consider: keep 68k libraries compatible with the
  66.   emulation (any which aren't broken will run) and keep the sources
  67.   capable of being compiled PPC-native as well).
  68.  
  69.   This goal basically has been reached already, still missing of
  70.   course are some of the less Amiga-native compilers and also
  71.   tests with any kind of "AmigaOS for PowerPC" or other CPUs.
  72.  
  73.   But since Assembler is nearly as portability-hostile as BCPL _today_
  74.   we may come quite close to the goal defined above by just moving
  75.   towards C and making some smart inter-compiler #defines.
  76.  
  77.   Translate your 68k-assembler library startup-codes easily
  78.   to C by simply using this source-code as an advice how to do it.
  79.  
  80.   For testing: install the (re)compiled example.library to LIBS: and
  81.   start the test program - it should pop up a requester, then.
  82.  
  83.   If you can submit adjustments for the other compilers as mentioned
  84.   above: feel free to send these.
  85.   ---
  86.   Feel free to use this source for own projects.
  87.  
  88.   It is allowed to be spread and distributed anywhere, as far
  89.   as my consent is concerned.
  90.  
  91.   Amiga International, or the current owner of the technologie,
  92.   is allowed to always put this source on their newest
  93.   Developer CD-ROM.
  94.  
  95.   Any form of credits will be greatly appreciated.
  96.  
  97.   ** General PerSuaSiVe SoftWorX WWW Support Site is http://www.ar-kleinert.de **
  98.    _________________________________________________________
  99.   |      You may reach me the following way.                |
  100.   |    Send bug-reports, money or whatever to:              |
  101.   |---------------------------------------------------------|
  102.   |        * SuperView Development & Registration *         |
  103.   |          * DRAFU Development & Registration *           |
  104.   |       * Image Engineer Registration Site Europe *       |
  105.   |                                                         |
  106.   |                                                         |
  107.   |                  PerSuaSiVe SoftWorX                    |
  108.   |                                                         |
  109.   |                  Andreas R. Kleinert                    |
  110.   |                  Am Kornberg 48                         |
  111.   |                  D-57076 Siegen                         |
  112.   |                  Germany, Europe                        |
  113.   |                                                         |
  114.   |                  +49-271-22869                          |
  115.   |                  (also FAX + AM)                        |
  116.   |                                                         |
  117.   |                  Weekdays after 18.00h.                 |
  118.   |                                                         |
  119.   |         When calling via phone you may leave a message, |
  120.   |         if I'm not available - but don't expect me      |
  121.   |         calling back to USA, Australia, ... since       |
  122.   |         german phone rates are HIGHLY expensive.        |
  123.   |_________________________________________________________|
  124.  
  125.   EMail:
  126.  
  127.         Please ask before sending binaries!
  128.         And please think twice before asking - my postbox
  129.         is not unlimited in size.
  130.  
  131.         * Do not send binaries via Fido or Fido-Gates ! *
  132.  
  133.            - Fido   Andreas Kleinert 2:2457/350.18
  134.            - Usenet
  135.               >>>   info@ar-kleinert.de
  136.                     Andreas_Kleinert@gmx.de
  137.                     ARK@News.wwbnet.de
  138.  
  139.            - If nothing else works, try one of these public
  140.              Fido-Usenet gateways:
  141.  
  142.                In Germany:
  143.                  Andreas_Kleinert@p18.f350.n2457.z2.fido.sub.org
  144.  
  145.                From USA or elsewhere:
  146.                  Andreas_Kleinert@p18.f350.n2457.z2.fidonet.org
  147.  
  148.  
  149.  History:
  150.  
  151.  V37.34 (22.04.00): - bumped date, updated contact information,
  152.                       added early MorphOS comments
  153.  
  154.  V37.33 (14.03.99): - added revised StormC project file by
  155.                       Fredrik Rambris <fredrik.rambris@amiga.nu>
  156.                     - small changes to the docs
  157.  
  158.  V37.32 (02.03.99): - finally fixed version problem by adding
  159.                       additional $VER string
  160.                     - updated docs and email addresses
  161.  
  162.  V37.31 (18.03.98): - changed SEGLISTPTR type definition for VBCC
  163.                       (-> Patrick Burnand)
  164.                     - fixed some typos and improved style in several
  165.                       source modules and headers
  166.  
  167.  V37.30 (07.03.98): - added DICE support, done by Patrick Burnand
  168.                       <pburnand@hotmail.com>
  169.                       He modified LibInit.c and StartUp.c to avoid a possible
  170.                       bug in DICE.  The 'extern' keyword might not always be
  171.                       supported well.  (extern struct ExampleBase*...)
  172.                     - added some typecasts to InitTable definition
  173.                       (so that the other compilers can't complain about the
  174.                        changes done for DICE)
  175.                     - simplified sample program
  176.                     - again fixed type definition of "seglist" pointer;
  177.                       it's now a global typedef-inition/#define in compiler.h
  178.                       (SEGLISTPTR) so everyone should be happy again
  179.                       (-> Sven Drieling)
  180.  
  181.  V37.22 (29.12.97): - fixed TestExampleLib.c
  182.                       (-> Stephan Rupprecht)
  183.                     - updated Stephan's email address
  184.                       (now is: stephan.rupprecht@metronet.de)
  185.                     - renamed "c_lib" directory and "ReadMe_First"
  186.                       to CLib37x#?
  187.  
  188.  V37.21 (19.12.97): - adjusted "compiler.h" as suggested by Volker Barthelmann
  189.                       (VBCC), done by Patrizio Biancalani
  190.                     - updated Patrizio's email address (-> ReadMe.VBCC)
  191.                     - fixed my email, too (how did that COB.wwbnet.de make
  192.                       it into this readme again ?)
  193.                     - "compiler.h" now protected from multiple #inclusion
  194.  
  195.  V37.20 (02.12.97): - added VBCC support, done by Patrizio Biancalani
  196.                       <P.Biancalani@agora.stm.it>
  197.  
  198.  V37.17 (24.10.97): - updated "ReadMe_MAXON" and added a bug-description
  199.                       (plus workaround) as supplied by Stephan Rupprecht
  200.                       <Rupprecht_Verwertung@t-online.de>
  201.                       [ 29/12/97: stephan.rupprecht@metronet.de ]
  202.  
  203.  V37.16 (23.8.97) : - V37.15 - frozen AROS spin-off
  204.                     - AROS-Version now included with AROS package, separately
  205.                     - added comments about Forbid/Permit/Wait/single-threading
  206.                       to the Library access functions
  207.                     - also commented the rest a little bit
  208.                       (-> maybe some certain people from comp.sys.amiga.programmer
  209.                           now feel better - but then again... maybe not ;)
  210.  
  211.  V37.14 (13.8.97) : - AROS: - the LH1_ to LH2_ macro replacements in
  212.                               "compiler.h" had been wrongly defined
  213.                             - "BPTR" type only was available under AROS,
  214.                               now using "struct SegList *"
  215.                             - AROS version now does compile under AmigaOS
  216.                               with SAS/C 6.58, too
  217.                     - "APTR seglist" now "struct SegList *"
  218.  
  219.  V37.13 (19.7.97) : - GNU makefile had lost its TABs
  220.                       (-> Gunter Nikl)
  221.  
  222.  V37.12 (29.6.97) : - fixed memory bug-fix (argh)
  223.                       (-> Gunter Nikl)
  224.                     - changed/applied GCC adjustments
  225.                       (-> diffs by Gunter Nikl)
  226.  
  227.  V37.11 (24.6.97) : - added "known bugs" section
  228.                     - LibInit now delocates library base on error
  229.                       (NULL return)
  230.                       (-> Gunter Nikl)
  231.                     - added AROS version, and created an additional
  232.                       source tree for it, since I did not get it compiled
  233.                       with SAS/C 6.57 and there's perhaps additional
  234.                       #ifdef stuf to be done. Anyone likes to merge these ?
  235.                       (-> Aaron Digulla)
  236.  
  237.  V37.10 (6.4.97) :  - added GCC version by Stefan Fuchs, snfuchs@sokrates.franken.de.
  238.                       Thanks !
  239.                     - some small changes to docs, includes and comments
  240.                     - still missing: DICE, Aztec, vbcc. Who does it ?
  241.                     - fixed ftn email address
  242.  
  243.  V37.6 (27.3.97) :  - finetuning
  244.  
  245.  V37.5 (24.1.97) :  - rewrote docs
  246.                     - added basic support for compiler independent
  247.                       register naming and SAS/C keyword replacements
  248.                       (compiler.h). Thus sources now should be easily
  249.                       adaptable for GCC as well.
  250.  
  251.  V37.4 (8.1.97) :   - added FD file
  252.                     - added new pragma file (and dir) as
  253.                       include/pragma/example_lib.h
  254.                       which works with Aztec, Maxon, Storm,
  255.                       DICE and SAS C compilers.
  256.                       Thanks to fd2pragma and Dirk Stoecker.
  257.                     - some fixes to the readme files
  258.                     - updated eMail list
  259.  
  260.  V37.3 (3.1.97) :   - slightly changed SCOPTIONS
  261.                     - fixed some style things (APTR and library casts)
  262.                     - changed note about library opening at L_OpenLibs()
  263.                     - now compileable with StormC 2.0 as well
  264.                       (not tested with 1.1) - see readme file for StormC
  265.                     - added project file for StormC 2.0, smakefile still
  266.                       present - select, which one you'd like to use
  267.  
  268.  V37.2 (12.12.96) : - applied some more changes and fixes
  269.                       (-> suggested by Helmut Hummel)
  270.                     - added icons
  271.                       (-> from Helmut Hummel)
  272.  
  273.  V37.1 (4.12.96) : - bumped version to V37
  274.                    - added MaxonC 3.x version by applying changes
  275.                      to the SAS/C sources and adding Maxon
  276.                      specific make and configuration files
  277.                      (-> all done by Helmut Hummel, see Readme.MAXON)
  278.                    - added StormC support
  279.                    - yet missing: DICE, Aztec, GNU. Who does it ?
  280.  
  281.  V1.4 (30.11.96) : - added SAS/C specific Ctrl-C disabling code
  282.                    - made some workarounds compiler sensitive
  283.                    - redone all with SAS/C V6.57
  284.                    - 944 Bytes ;-)
  285.  
  286.  V1.3 (13.9.96) :  - when starting lib as executable, -1 must be returned
  287.                    - now caching SysBase
  288.                    - added some comments, where changes should not
  289.                      be applied
  290.                    - added note about sharing library bases
  291.                    - documented and modified sample function,
  292.                      so that correct a0/a1/d0/d1 and a6 usage becomes
  293.                      more obviously and verbose
  294.                    - still 940 bytes ;-)
  295.  
  296.  V1.2 (5.9.96)  :  - fixed some things resulting out of a
  297.                      discussion in Z-Netz
  298.  
  299.  V1.1 (1.9.96)  :  - small changes in style
  300.                      (only bumped versions of changed modules):
  301.                        o moved "examplebase.h" to include/example/
  302.                          (so also adjusted LibInit.c, StartUp.c
  303.                           and SCOPTIONS for reflecting that)
  304.                        o SampleFuncs.h did contain wrong prototype
  305.                          (did not matter, since only used for
  306.                           ULONG function table within StartUp.c)
  307.                        o explicitely __aligned ROMTag structure
  308.  
  309.  V1.0 (14.8.96) : - first release
  310.  
  311.  
  312.  ---
  313.  All mentioned trademarks are subject to their owners.
  314.  
  315.  
  316. ============================= Archive contents =============================
  317.  
  318. Original  Packed Ratio    Date     Time    Name
  319. -------- ------- ----- --------- --------  -------------
  320.     1720     433 74.8% 11-Dec-96 15:39:54 +bin.info
  321.     5252    3484 33.6% 07-Mar-98 13:52:12 +TestExampleLib
  322.      450     230 48.8% 11-Dec-96 15:49:34 +TestExampleLib.info
  323.     1209     658 45.5% 07-Mar-98 13:28:48 +ReadMe.DICE
  324.     1884     861 54.2% 01-Apr-97 11:27:18 +ReadMe.GCC
  325.      778     424 45.5% 19-Dec-97 09:13:50 +ReadMe.VBCC
  326.     1720     433 74.8% 11-Dec-96 15:39:56 +source.info
  327.      125     117  6.4% 08-Jan-97 19:09:50 +example.fd
  328.      425     247 41.8% 05-Dec-96 11:45:24 +example_protos.h
  329.      289     185 35.9% 05-Dec-96 11:44:58 +example.h
  330.      657     323 50.8% 07-Mar-98 13:50:38 +examplebase.h
  331.      477     247 48.2% 08-Jan-97 19:10:26 +example_lib.h
  332.      311     207 33.4% 05-Dec-96 11:45:38 +example_pragmas.h
  333.      330     207 37.2% 05-Dec-96 11:45:50 +example.h
  334.     1720     433 74.8% 11-Dec-96 15:39:42 +lib_source.info
  335.       25      25  0.0% 05-Dec-96 12:07:46 +make_storm.bat
  336.      360     186 48.3% 07-Mar-98 13:28:48 +makefile.dice
  337.      427     223 47.7% 19-Jul-97 14:07:00 +makefile.gcc
  338.      419     164 60.8% 11-Dec-96 15:31:14 +makefile.MAXON
  339.      347     232 33.1% 05-Dec-96 11:36:28 +makefile.MAXON.info
  340.      347     181 47.8% 02-Dec-97 10:34:46 +makefile.vbcc
  341.      381     232 39.1% 05-Dec-96 11:36:28 +mcpp.SESSION
  342.     1591     824 48.2% 02-Dec-97 10:34:46 +SampleFuncs.c
  343.      370     248 32.9% 02-Dec-97 10:34:46 +SampleFuncs.h
  344.      128     105 17.9% 03-Jan-97 15:29:36 +SCOPTIONS
  345.      395     148 62.5% 05-Dec-96 11:36:28 +smakefile
  346.       95      85 10.5% 05-Dec-96 11:36:28 +smakefile.wth
  347.      624     350 43.9% 03-Jan-97 15:44:56 +storm_project.¶.info
  348.      622     269 56.7% 03-Jan-97 15:44:30 +storm_smakefile
  349.      119     100 15.9% 05-Dec-96 11:36:28 +SCOPTIONS
  350.      256     105 58.9% 05-Dec-96 11:36:28 +smakefile
  351.     5252    3484 33.6% 07-Mar-98 13:52:12 +TestExampleLib
  352.      762     410 46.1% 07-Mar-98 13:36:24 +TestExampleLib.c
  353.      835     394 52.8% 05-Dec-96 11:36:28 +TestExampleLib.info
  354.      380     278 26.8% 07-Mar-98 13:52:10 +TestExampleLib.o
  355.     5361    1664 68.9% 18-Mar-98 09:36:12 +compiler.h
  356.      216     194 10.1% 18-Mar-98 09:47:42 +SampleFuncs.o
  357.    10208    2527 75.2% 18-Mar-98 09:47:22 +StartUp.c
  358.      828     513 38.0% 18-Mar-98 09:47:34 +StartUp.o
  359.      920     607 34.0% 02-Mar-99 19:17:06 +example.library
  360.      920     607 34.0% 02-Mar-99 19:17:06 +example.library
  361.     5534    1939 64.9% 02-Mar-99 19:17:00 +LibInit.c
  362.      920     554 39.7% 02-Mar-99 19:17:06 +LibInit.o
  363.     2687     676 74.8% 14-Mar-99 09:22:52 +storm_project.¶
  364.    14874    5281 64.4% 22-Apr-00 09:01:30 +CLib37x.readme
  365.     2120    1083 48.9% 22-Apr-00 09:03:32 +ReadMe.AROS
  366.     1835     987 46.2% 22-Apr-00 09:03:34 +ReadMe.MAXON
  367.      388     261 32.7% 22-Apr-00 09:05:14 +ReadMe.MorphOS
  368.      494     285 42.3% 22-Apr-00 09:03:34 +ReadMe.SAS
  369.     1001     533 46.7% 22-Apr-00 09:03:32 +ReadMe.STORM
  370. -------- ------- ----- --------- --------
  371.    79388   34243 56.8% 22-Apr-100 20:33:20   50 files
  372.